<?php 
$size = disk_total_space('d:');
echo $size / pow(1024, 3);


 ?>